package com.icart.entities;

import javax.persistence.*;

@Entity
@Table(name = "wo_commentpic", schema = "amp", catalog = "")
@IdClass(WoCommentpicEntityPK.class)
public class WoCommentpicEntity {
    private long commid;
    private String picid;
    private String picurl;

    @Id
    @Column(name = "commid")
    public long getCommid() {
        return commid;
    }

    public void setCommid(long commid) {
        this.commid = commid;
    }

    @Id
    @Column(name = "picid")
    public String getPicid() {
        return picid;
    }

    public void setPicid(String picid) {
        this.picid = picid;
    }

    @Basic
    @Column(name = "picurl")
    public String getPicurl() {
        return picurl;
    }

    public void setPicurl(String picurl) {
        this.picurl = picurl;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        WoCommentpicEntity that = (WoCommentpicEntity) o;

        if (commid != that.commid) return false;
        if (picid != null ? !picid.equals(that.picid) : that.picid != null) return false;
        if (picurl != null ? !picurl.equals(that.picurl) : that.picurl != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = (int) (commid ^ (commid >>> 32));
        result = 31 * result + (picid != null ? picid.hashCode() : 0);
        result = 31 * result + (picurl != null ? picurl.hashCode() : 0);
        return result;
    }
}
